<h1>Admin Stuff</h1>

<h2>Switch to User</h2>

<%= form_tag("/members/switch_user", :method => "get") do %>
  <%= select_tag(:member_id, options_for_select(Member.find(:all, :order => 'name1').collect{ |v| [v.name,v.id] })) %>
  <br />
  <%= submit_tag "Switch" %>
<% end %>
<br><br>

<h2>Settings</h2>
<%= form_for(@settings) do |f| %>
  <div class="field">
    <%= f.label :sales_tax_percent %><br />
    <%= f.text_field :sales_tax %>
  </div>
  <div class="field">
    <%= f.label :global_markup_percent %><br />
    <%= f.text_field :global_markup_percent %>
  </div>
  <div class="field">
    <%= f.label :paypal_fee_percent %><br />
    <%= f.text_field :paypal_fee_percent %>
  </div>
  <div class="field">
    <%= f.label :paypal_fee_per_transaction %><br />
    <%= f.text_field :paypal_fee_per %>
  </div>
  <div class="field">
    <%= f.label :required_workshare_hours_per_month %><br />
    <%= f.text_field :workshare_hours_per_month %>
  </div>
  <div class="field">
    <%= f.label :disable_when_this_many_months_under_on_workshare %><br />
    <%= f.text_field :num_months_under_disable %>
  </div>
  <div class="field">
    <%= f.label :annual_fee %><br />
    <%= f.text_field :annual_fee %>
  </div>
  <div class="field">
    <%= f.label :start_up_fee %><br />
    <%= f.text_field :startup_fee %>
  </div>
  <div class="field">
    <%= f.label :startup_fee_days_after_due_until_disabled %><br />
    <%= f.text_field :startup_fee_slack_days %>
  </div>
  <div class="field">
    <%= f.label :annual_fee_days_after_due_until_disabled %><br />
    <%= f.text_field :annual_fee_slack_days %>
  </div>
  <div class="field">
    <%= f.label :allow_pickups_on %><br />
    <% dows = {"Sunday" => 0, "Monday" => 1, "Tuesday" => 2, "Wednesday" => 3, "Thursday" => 4, "Friday" => 5, "Saturday" => 6 } %>
    <% dows.each do |k,v| %>
    <%= check_box_tag("pickup_dows[]",v,@pickup_dows[v].nil? ? false : true) %>
    <%= label_tag(k) %>
    <% end %>

  </div>
<%= submit_tag %>
<% end %>
